<template>
	<view class="setting">
		<!-- 状态栏占位 -->
		<view class="status-bar"></view>
		<!-- #ifdef MP-WEIXIN -->
		<headBarWX title="设置" :show='true'></headBarWX>
		<!-- #endif -->
		<!-- #ifndef MP-WEIXIN -->
		<headBarAPP title='设置' :showButtonMore="false"></headBarAPP>
		<!-- #endif -->

		<view class="container">
			<view class="item change-password" @tap="To_change_password()">
				<view class="text">修改登录密码</view>
				<view class="iconfont right-arrow">&#xe683;</view>
			</view>
			<view class="item log-out" @tap="Log_out()">
				<view class="text">退出登录</view>
				<view class="iconfont right-arrow">&#xe683;</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			Log_out() {
				let app = getApp();
				app.userInfo = {
					_id: '',
					name: '',
					account: '',
				}
				uni.navigateTo({
					url: "/pages/personalPage/logIn/logIn"
				})
			},

			To_change_password() {
				console.log("修改密码");
				uni.navigateTo({
					url: '/pages/personalPage/setting/changePassword/changePassword'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.item {
		margin-left: 20rpx;
		margin-right: 20rpx;
		border-bottom: 3rpx solid rgba(0, 0, 0, 0.05);
		height: 120rpx;
		position: relative;

		.text {
			position: absolute;
			left: 30rpx;
			top: 50%;
			transform: translateY(-50%);
			font-size: $font-size-l-s;
			opacity: 0.7;
		}

		.right-arrow {
			position: absolute;
			right: 20rpx;
			top: 50%;
			transform: translateY(-50%);
			font-size: $icon-size-s-m;
			opacity: 0.8;
		}
	}

	.log-out {
		.text {
			color: red;
		}
	}


</style>